print('1.字符串的切片操作')
s = "hello,Python"
s1 = s[:5]
print(s1)
s2 = s[6:]
print(s2)
s3 = "!"
newstr = s1 + s3 + s2
print(newstr)
print()

s = "hello,Python"
print(s[1:5:1])
print(s[1:5:2])
print(s[::2])
print(s[::-1])